﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Zocono.WCS.Domain.ElevatorManage;
using Zocono.WCS.Domain.EntityInfo;
using Zocono.WCS.Infrastructure.ApllicationDto;
using Zocono.WCS.Infrastructure.ApllicationDto.DtoWcsManage;

namespace Zocono.WCS.Application.AppConfigureManage
{
    
    public class ElevatorInfoApp
    {
        public IElevatorInfoService _IElevatorInfoService;
        public IElevatorJudgeInfoService _IElevatorJudgeInfoService;
        public IElevatorMasterInfoService _IElevatorMasterInfoService;
        public ElevatorInfoApp(IElevatorInfoService elevatorInfoService, IElevatorJudgeInfoService elevatorJudgeInfoService, IElevatorMasterInfoService iElevatorMasterInfoService)
        {
            _IElevatorInfoService = elevatorInfoService;
            _IElevatorJudgeInfoService = elevatorJudgeInfoService;
            _IElevatorMasterInfoService = iElevatorMasterInfoService;
        }


        public async Task<List<ElevatorInfoDto>> GetElevatorInfos()
        {
            var elevators = await _IElevatorInfoService.GetElevatorInfos();

            return elevators;
        }


        public async Task<ElevatorInfoDto> GetElevatorInfoById(long id)
        {
            var elevators = await _IElevatorInfoService.GetElevatorInfoById(id);
            return elevators;
        }



        public async Task<bool> UpdateElevatorInfos(ElevatorInfoDto elevatorInfoDto)
        {
            var res = await _IElevatorInfoService.UpdateElevatorInfos(elevatorInfoDto);
            return res;
        }

        public async Task<ElevatorJudgeInfoDto> GetElevatorJudgeInfoByIDAsync(long id)
        {
            var elevators = await _IElevatorJudgeInfoService.GetElevatorJudgeInfoByIDAsync(id);
            return elevators;
        }

        public async Task<bool> UpdateElevatorJudgeAsync(ElevatorJudgeInfoDto elevatorInfoDto)
        {
            var res = await _IElevatorJudgeInfoService.UpdateElevatorJudgeAsync(elevatorInfoDto);
            return res;
        }

        public async Task<PageDto<ElevatorJudgeInfoDto>> GetElevatorJudgeInfosAsync(ElevatorJudgeInfoDto elevatorInfoDto)
        {
            return await _IElevatorJudgeInfoService.GetElevatorJudgeInfosAsync(elevatorInfoDto);
        }


        public async Task<ElevatorMasterInfoDto> GetElevatorMasterInfoByIDAsync(long id)
        {
            var elevators = await _IElevatorMasterInfoService.GetElevatorMasterInfoByIDAsync(id);
            return elevators;
        }
        public async Task<bool> UpdateElevatorMasterAsync(ElevatorMasterInfoDto elevatorInfoDto)
        {
            var res = await _IElevatorMasterInfoService.UpdateElevatorMasterAsync(elevatorInfoDto);
            return res;
        }

        public async Task<PageDto<ElevatorMasterInfoDto>> GetElevatorMasterInfosAsync(ElevatorMasterInfoDto elevatorInfoDto)
        {
            return await _IElevatorMasterInfoService.GetElevatorMasterInfosAsync(elevatorInfoDto);
        }


        public async Task<bool> InsertElevatorMasterAsync(ElevatorMasterInfoDto elevatorInfoDto)
        {
            var res = await _IElevatorMasterInfoService.InsertElevatorMasterAsync(elevatorInfoDto);
            return res;
        }
        
    }
}
